<!DOCTYPE html>
<html>
  
  <head>
    <meta charset="UTF-8">
    <title>修改用户信息</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
    <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
    <link rel="stylesheet" href="/static/css/font.css">
    <link rel="stylesheet" href="/static/css/xadmin.css">
    <script type="text/javascript" src="/static/js/jquery.min.js"></script>
    <script type="text/javascript" src="/static/lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="/static/js/xadmin.js"></script>
    <!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
    <!--[if lt IE 9]>
      <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
      <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
  </head>
  
  <body>
    <div class="x-body">
        <form class="layui-form" method="post"  enctype="multipart/form-data">
            <div class="layui-form-item">
                <label  class="layui-form-label">
                    序号
                </label>
                <div class="layui-input-inline">
                    <input type="text" id="id_ms" name="id_ms" required="" lay-verify="required|id_repeat"
                    autocomplete="off" class="layui-input" value={{view_dict.id}} disabled>
              </div>
          </div>
          <div class="layui-form-item">
                <label for="user_part" class="layui-form-label">
                    <span class="x-red">*</span>主号单位
                </label>
                <div class="layui-input-inline">
                    <input type="text" id="user_company" name="user_company" disabled required="" value={{view_dict.id_main__user_company}}  lay-verify="required"  autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label for="user_part" class="layui-form-label">
                    <span class="x-red">*</span>主号部门
                </label>
                <div class="layui-input-inline">
                    <input type="text" id="user_part" name="user_part" disabled required="" value={{view_dict.id_main__user_part}}{{view_dict.id_main__user_part__part_name}}  lay-verify="required"  autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label for="user_part" class="layui-form-label">
                    <span class="x-red">*</span>主号姓名
                </label>
                <div class="layui-input-inline">
                    <input type="text" id="user_main" name="user_main" disabled required="" value={{view_dict.id_main__user_name}}  lay-verify="required"  autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label for="user_identity" class="layui-form-label">
                   主号类别
                </label>
                <div class="layui-input-inline">
                    <input type="text"    id="user_identity" name="user_identity" required="" lay-verify="required"
                    autocomplete="off" class="layui-input" value={{view_dict.id_main__user_identity}} disabled>
                </div>
            </div>
            <div class="layui-form-item">
                <label for="user_name" class="layui-form-label">
                    <span class="x-red">*</span>姓名
                </label>
                <div class="layui-input-inline">
                    <input type="text" id="user_name" name="user_name" disabled required="" value={{view_dict.user_name}}  lay-verify="required"  autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label for="id_card" class="layui-form-label">
                    <span class="x-red">*</span>身份证号
                </label>
                <div class="layui-input-inline">
                    <input type="text" id="id_card" name="id_card" disabled required="" value={{view_dict.id_card}} lay-verify="required|identity" autocomplete="off" class="layui-input">
                </div>
            </div>
        <div class="layui-form-item">
            <label for="phone_number" class="layui-form-label">
                <span class="x-red">*</span>副号号码
            </label>
            <div class="layui-input-inline">
                <input type="text" id="phone_number" name="phone_number" required="" value={{view_dict.phone_number}} lay-verify="phone"  autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label for="short" class="layui-form-label">
                <span class="x-red">*</span>副号短号
            </label>
            <div class="layui-input-inline">
            <input type="text" id="short_number" name="short_number" required="" value={{view_dict.short_number}}  autocomplete="off" class="layui-input">
        </select>
        </div>
        </div>
        <div class="layui-form-item">
            <label for="remark" class="layui-form-label">
                <span class="x-red">*</span>备注
            </label>
            <div class="layui-input-inline">
                <input type="text" id="remark" name="remark" disabled autocomplete="off" value={{view_dict.remark}} class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label for="reason" class="layui-form-label">
                <span class="x-red">*</span>删除原因    
            </label>
            <div class="layui-input-inline">
                <input type="text" id="reason" name="reason"  value="" required="" lay-verify="required"
                autocomplete="off" class="layui-input" >
            </div>
        </div>
        <div class="layui-form-item">
            <label for="reason" class="layui-form-label"> 
            </label>
        </div>
          <div class="layui-form-item">
              <label for="L_repass" class="layui-form-label">
              </label>
              <button  class="layui-btn" lay-filter="add" lay-submit="">
                  提交删除申请
              </button>
          </div>
      </form>
    </div>
    <script>
        layui.use(['form','layer'], function(){
            $ = layui.jquery;
          var form = layui.form
          ,layer = layui.layer;
          //监听提交
        form.on('submit(add)', function(data){
            console.log(data);
            $.ajax({
                cache:false,
                url:'/save_del_vicedata/',
                method:'post',
                dataType:'json',
                data: data.field,
                async:true,
                success:function(res){
                    if(res.status=='success'){
                        layer.msg(res.msg, {icon: 6},function (index) {
                            // 获得frame索引
                            var index = parent.layer.getFrameIndex(window.name);
                            //关闭当前frame
                            parent.layer.close(index);
                        })
                    }else if(res.status=='fail'){
                        layer.msg(res.msg, {icon: 7});
                }
                },
                error:function(){
                    layer.msg(res.msg, {icon: 7});
                }
            });
            return false;
        });
        form.verify({
            id_repeat:function(value){
                var msg;
                $.ajax({
                cache:false,
                data:{'number_id':value,'number_type':'vice'},
                method:'post',
                dataType:'json',
                data:{'phone_number':value},
                async:false,
                success:function(res){
                    if(res.status=='fail'){
                        msg = res.fail_msg;
                    }
                },
                });
                return msg;
            }
        });
    });
 </script>

  </body>

</html>